class MutDoubleHitFix extends Mutator;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
	local float DefHeight;
	local vector DefOffset;
	local KFMonster KFM;
	
	if (KFMonster(Other) != none)
	{
		KFM = KFMonster(Other);
		
		KFM.bCanBeDamaged = false;
		
		if (KFM.bUseExtendedCollision)
		{
			DefHeight = KFM.ColHeight;
			DefOffset = KFM.ColOffset;
			KFM.ColHeight = (KFM.CollisionHeight + DefOffset.Z + DefHeight) * 0.5;
			KFM.ColOffset.Z = (KFM.ColHeight - KFM.CollisionHeight);
		}
		else
		{
			KFM.bUseExtendedCollision = true;
			KFM.ColRadius = KFM.CollisionRadius;
			KFM.ColHeight = KFM.CollisionHeight;
		}
	}
	
	return true;
}

defaultproperties
{
	GroupName="KF-DoubleHitFix"
	FriendlyName="Fix Double Hit Bug"
	Description="Fixes bug that causes specimens to take twice the amount of damage from projectiles and explosives.||Author: Benjamin|Date: 27/October/2011"
}